import java.util.*;
public class test_1_6 {
//    public static void main(String[] args) {
//        Queue<Integer> queue=new LinkedList<>();
//        Deque<Integer> queue1=new LinkedList<>();
//
//        Deque<Integer> stack=new ArrayDeque<>();
//        stack.push(1);
//        stack.push(2);
//        stack.push(3);
//        stack.push(4);
//        System.out.println(stack);
//        Deque<Integer> stack1=new LinkedList<>();
//        stack1.push(1);
//        stack1.push(2);
//        stack1.push(3);
//        stack1.push(4);
//        System.out.println(stack1);
//
//        ArrayList<Integer> arrayList=new ArrayList<>();
//        LinkedList<Integer> linkedList=new LinkedList<>();
//
//    }


    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.createTree();
        System.out.print("前序：");
        binaryTree.preOrder(root);
        System.out.println();
        System.out.print("中序：");
        binaryTree.inOrder(root);
        System.out.println();
        System.out.print("后序：");
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("--------------");
        binaryTree.size(root);
        System.out.println("节点个数2："+ BinaryTree.nodeSize);
        System.out.println("节点个数1："+ binaryTree.size2(root));
        binaryTree.getLeafNodeCount1(root);
        System.out.println("叶子节点个数1："+BinaryTree.leafSize);
        System.out.println("叶子节点个数2："+binaryTree.getLeafNodeCount2(root));
        System.out.println("第k层节点个数："+binaryTree.getKLevelNodeCount(root,3));
        System.out.println("二叉树高度："+binaryTree.getHeight(root));
        System.out.println(binaryTree.find(root,'M'));
        binaryTree.levelOrder(root);
        System.out.println();
        System.out.println(binaryTree.isCompleteTree(root));
    }

}



